/*
* 自动导入公共组件
* */
const modulesFiles = import.meta.globEager('../components/*/index.vue')
import type {App} from "vue"


const jieguo = Object.keys(modulesFiles).filter(()=> true)
// console.log(jieguo,"发现的公共组件")
export function useComponent(app:App){
    jieguo.forEach((item)=>{
        const moduleName = item.split("/")[2]
        const componentConfig:any = modulesFiles[item]
        // console.log(moduleName,"公共组件名称")
        app.component(moduleName, componentConfig.default || componentConfig)
    })
}


